﻿//-----------------------------------------------------------------------
// <copyright file="CorporationStatusFactory.cs" company="Mulala">
//     Copyright Mulala. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace Mulala.Cavan.Domain.MainBoundedContext.CorporationModule
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Mulala.Cavan.Domain.MainBoundedContext.Setting;

    public static class CorporationStatusFactory
    {
        public static CorporationStatus CreateCorporationStatus(string editUser)
        {
            CorporationStatus corporationStatus = CorporationStatusFactory.CreateCorporationStatus(DateTime.Parse(Project.Settings.DefaultTime), DateTime.Parse(Project.Settings.DefaultTime), DateTime.Parse(Project.Settings.DefaultTime), DateTime.Parse(Project.Settings.DefaultTime), DateTime.Parse(Project.Settings.DefaultTime),
                                                                           DateTime.Parse(Project.Settings.DefaultTime), 0, DateTime.Now.AddMonths(Project.Settings.FreeDuration), DateTime.Parse(Project.Settings.DefaultTime), 0, 0, CorporationIdentifier.CheckedStatus.UnChecked,
                                                                           CorporationIdentifier.CheckedStatus.UnChecked, CorporationIdentifier.CheckedStatus.UnChecked, CorporationIdentifier.CheckedStatus.UnChecked,
                                                                           CorporationIdentifier.OnLineStatus.OffLine, DateTime.Now, editUser);
            return corporationStatus;
        }

        public static CorporationStatus CreateCorporationStatus(
                                            DateTime refreshTime,
                                            DateTime businessLicenseCheckedTime,
                                            DateTime basicInfoCheckedTime,
                                            DateTime logoCheckedTime,
                                            DateTime recommendTime,
                                            DateTime recommendTimeout,
                                            int nannyRecommendLeftMonth,
                                            DateTime freeTimeout,
                                            DateTime VIPTimeout,
                                            int nannyVipLeftMonth,
                                            int corporationVipLeftMonth,
                                            CorporationIdentifier.CheckedStatus businessLicenseStatus,
                                            CorporationIdentifier.CheckedStatus basicInfoStatus,
                                            CorporationIdentifier.CheckedStatus logoStatus,
                                            CorporationIdentifier.CheckedStatus checkedStatus,
                                            CorporationIdentifier.OnLineStatus onLineStatus,
                                            DateTime editTime,
                                            string editUser)
        {
            CorporationStatus corporationStatus = new CorporationStatus();
            corporationStatus.BasicInfoCheckedTime = basicInfoCheckedTime;
            corporationStatus.BasicInfoStatus = basicInfoStatus;
            corporationStatus.BusinessLicenseCheckedTime = businessLicenseCheckedTime;
            corporationStatus.BusinessLicenseStatus = businessLicenseStatus;
            corporationStatus.CheckedStatus = checkedStatus;
            corporationStatus.EditTime = editTime;
            corporationStatus.EditUser = editUser;
            corporationStatus.FreeTimeout = freeTimeout;
            corporationStatus.OnLineStatus = onLineStatus;
            corporationStatus.LogoCheckedTime = logoCheckedTime;
            corporationStatus.LogoStatus = logoStatus;
            corporationStatus.RecommendTime = recommendTime;
            corporationStatus.RecommendTimeout = recommendTimeout;
            corporationStatus.NannyRecommendLeftMonth = nannyRecommendLeftMonth;
            corporationStatus.RefreshTime = refreshTime;
            corporationStatus.VIPTimeout = VIPTimeout;
            corporationStatus.NannyVipLeftMonth = nannyVipLeftMonth;
            corporationStatus.CorporationVipLeftMonth = corporationVipLeftMonth;
            corporationStatus.CreateTime = DateTime.Now;

            return corporationStatus;
        }
    }
}
